/* A,B,C,D,E with black(lie) or white paper(truth) on head.  
 * A: 3 white 1 black
 * B: 4 black C:1 white 3 black D:4 white 
 */

#include<stdio.h>

int main(void){
  int a,b,c,d,e;
  for(a=0;a<=1;a++)            //0 for black 1 for white
    for(b=0;b<=1;b++)
      for(c=0;c<=1;c++)
	for(d=0;d<=1;d++)
	  for(e=0;e<=1;e++)
	    if((a&&b+c+d+e==3||!a&&b+c+d+e!=3)&&
               (b&&a+c+d+e==0||!b&&a+c+d+e!=0)&&
	       (c&&a+b+d+e==1||!c&&a+b+d+e!=1)&&
               (d&&a+b+c+e==4||!d&&a+b+c+e!=4))
	    {
	      printf("A with %s.\n", a?"white":"black");
	      printf("B with %s.\n", b?"white":"black");
	      printf("C with %s.\n", c?"white":"black");
	      printf("D with %s.\n", d?"white":"black");             
	      printf("E with %s.\n", e?"white":"black");
 }

  return 0;
}
